package com.iflytek.ci.cpms.dao;

import com.iflytek.ci.cpms.domain.TeamAccountMap;
import com.iflytek.ci.cums.domain.Account;
import com.iflytek.framework.mybatis.extra.MyBatisDao;

import java.util.List;

/**
 * <p>
 * 人员——团队对应关系表数据库访问接口.
 * </p>
 *
 * @author mdzhang
 * @since JDK 1.5
 */

@MyBatisDao
public interface TeamAccountMapDao {
	/**
	 * add a new team's teamAccount
	 *
	 * @param tid
	 * @param uid []
	 */
	int add_teamAccountMap(long tid, long[] uid);

	/**
	 * remove a team's teamAccount
	 *
	 * @param tid
	 */
	int remove_teamAccountMap(long tid);
    /**
     *get uids
     *
     * @param logins
     */
    public long[] idsFromLogins(String logins[]);

    /**
     *get uids
     *
     * @param accounts
     */
    int batch_account(List<Account> accounts);



	/**
	 * select teamAccount by tid
	 *
	 * @param tid
	 * @return List<long>
	 */
	List<TeamAccountMap> get_teamAccountMap(long tid);

	/**
	 * select uids by tid
	 *
	 * @param tid
	 * @return List<String>uids
	 */
	List<String> get_uidBytid(long tid);

    /**
     * 批量删除团队成员信息
     * @param ids
     *                 一个或多个团队id
     */
    int remove_team_with_ids(String[] ids);

    /**
     * 根据多个项目id删除团队成员信息
     * @param ids
     *                  一个或者多个项目id
     */
    int remove_team_with_projects(String[] ids);
}
